<?php
/* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

require_once(WebOrbServicesPath."gojoe/Go_userDataMapper.php");
/**
 * Description of LoginManager
 *
 * @author jbaeck
 */
class LoginManager {
//put your code here

    private $userMapper;

    public function  __construct() {
        $this->userMapper = new Go_userDataMapper();
    }

    public function login($user,$pwd) {

        $user = mysql_real_escape_string(base64_decode($user));
        $pwd = mysql_real_escape_string(base64_decode($pwd));

        $sql = "select * from go_user where fname='".$user."' and lname='".$pwd."'";
        $result = $this->userMapper->findBySql($sql);

        return $result->Result;
    }

}
?>
